export interface Reply {
  id: number
  content: string
  user: {
    username: string
    avatar: string
  }
  createdAt: string
  likes: number
  isLiked: boolean
  replyToUsername?: string // 被回复的用户名，如果回复主评论则为null
}

export interface Comment {
  id: number
  content: string
  username: string
  avatar: string
  createdAt: string
  likeCount: number
  isLiked: boolean
  replyCount: number
  location?: string
  isTop?: boolean // 是否是置顶评论
  parentId?: number
  replies?: Reply[]
}

export interface PaginationResponse<T> {
  items: T[]
  total: number
  page: number
  limit: number
}

export interface CommentResponse extends PaginationResponse<Comment> {}
export interface ReplyResponse extends PaginationResponse<Reply> {}

